package com.ruoyi.common.constant;

public class IotConstants {
    // 设备数据表名
    public static final String IOT_DEVICE_TABLE_NAME = "device_data_log_";
    // 阀门表名
    public static final String IOT_VALUE_TABLE_NAME = "value_data_log_";
    /** 热表 */
    public static final String DEVICE_TYPE_HEATING = "1";
    /** 智能阀 */
    public static final String DEVICE_TYPE_VALVE = "2";
    /** 温控阀 */
    public static final String DEVICE_TYPE_TEMPERATURE_VALVE = "3";

    /** 采集周期 1=每小时 2=每三小时 3=每6小时 4=每12小时 5=每天 */
    /** 每小时 */
    public static final String COLLECT_CYCLE_HOUR = "1";
    /** 每三小时 */
    public static final String COLLECT_CYCLE_THREE_HOUR = "2";
    /** 每6小时 */
    public static final String COLLECT_CYCLE_SIX_HOUR = "3";
    /** 每12小时 */
    public static final String COLLECT_CYCLE_TWELVE_HOUR = "4";
    /** 每天 */
    public static final String COLLECT_CYCLE_DAY = "5";


    public static final String ALARM_LEVEL_1 = "1";
    public static final String ALARM_LEVEL_2 = "2";
    public static final String ALARM_LEVEL_3 = "3";

    //告警类型
    /** 1=设备异常*/
    public static final String ALARM_TYPE_1 = "1";
    /** 2=设备规则报警*/
    public static final String ALARM_TYPE_2 = "2";
    /** 3=原始设备报警 */
    public static final String ALARM_TYPE_3 = "3";
    /** 4=关阀报警 */
    public static final String ALARM_TYPE_4 = "4";

    /** 设备类型 */
    /** 未处理 */
    public static final String ALARM_STATUS_UNHANDLED = "1";
    /** 已处理 */
    public static final String ALARM_STATUS_HANDLED = "2";


    public static final String REDIS_DEVICE_TYPE_HEATING = "device_type_heating:";
    public static final String REDIS_DEVICE_TYPE_VALVE = "device_type_valve:";
    public static final String REDIS_DEVICE_TYPE_TEMPERATURE_VALVE = "device_type_temperature_valve:";


    public static final Integer ELASTICSEARCH_MAX = 20000000;

    /** 阀门模式
    /** 通断模式 暂时不用了 */
    public static final String SET_MODE_IOT_VALUE = "129";
    /** 室温模式 */
    public static final String SET_MODE_IOT_TEMP = "131";
    /** 回水模式 可以设置回水温度*/
    public static final String SET_MODE_IOT_WATER = "130";
    /**流量平衡模式 阀门0-100*/
    public static final String SET_MODE_IOT_FLOW = "132";

    /**
     * 开阀
     */
    public static final String SET_OPENING_IOT_VALUE_OPEN = "1";
    /**
     * 关阀
     */
    public static final String SET_OPENING_IOT_VALUE_CLOSE = "0";
}
